package com.ocom.webapi.controller;



import com.ocom.common.constant.WebApiServiceUrl;
import com.ocom.common.resp.Result;
import com.ocom.webapi.service.QuarantineMsgService;


import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Log4j
@RestController
@PreAuthorize("@pms.hasRole('ROLE_WEB')" )
public class QuarantineMsgController {

    @Autowired
    private QuarantineMsgService quarantineMsgService;

    // 配置信息（QuarantineMsg/onShow）
    @GetMapping(WebApiServiceUrl.URL_QuarantineMsgOnShow)
    public Result QuarantineMsgOnShow(Long comId){
        return quarantineMsgService.QuarantineMsgOnShow(comId);
    }

    // 服务消息新增
    @PostMapping(WebApiServiceUrl.URL_QuarantineMsgModify)
    public Result QuarantineMsgModify(@Validated @RequestBody Map<String,Object> map){
        return quarantineMsgService.QuarantineMsgModify(map);
    }
}
